package com.hzm.controller;

import com.hzm.service.CourseService;
import com.hzm.utils.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @program: qy137-java
 * @description:
 * @author: 皇子明
 * @create:
 **/
@RestController
@RequestMapping({"/order/course"})
@Api(tags = "课程详情")
public class CourseController {
     @Autowired
    private CourseService courseService;
     @ApiOperation("通过课程id查询课程信息")
    @PostMapping("/queryAllCourse/{courseId}")
    public Result queryAllCourse(@PathVariable("courseId") @RequestBody String courseId){
         Result result=courseService.querAllCourse(courseId);
         return result;
     }
    @ApiOperation("查询课程和讲师信息")
    @PostMapping("/queryAllCourseAndTeacherName/{id}")
    public Result queryAllCourseAndTeacherName(@PathVariable("id") String id){
         Result result = courseService.queryAllCourseAndTeacherName(id);
         return result;
    }
    @ApiOperation("查询课时信息")
    @PostMapping("/queryAllKeShi/{id}")
    public Result queryAllKeShi(@PathVariable("id") String id){
         Result result =courseService.queryAllKeShi(id);
         return result;
    }
    @PostMapping("/queryAllById/{id}/{mobile}")
    public Result queryAllById(@PathVariable("id") String id,@PathVariable("mobile") String mobile){
         Result result = courseService.querAllBy(id,mobile);
         return  result;
    }
    @PostMapping("/queryMemberStatus/{id}/{mobile}")
    public Result queryMemberStatus(@PathVariable("id") String id,@PathVariable("mobile") String mobile){
        Result result = courseService.queryMemberStatus(id,mobile);
        return result;
    }
}




























